package core.boundary;

import java.util.ArrayList;

import core.controller.CommandController;
import core.controller.cmds.ICmd;
import exceptions.UserNotFoundException;

public class UserInterfaceTUI {

	public UserInterfaceTUI() {
		InputReader.init(new UserInputReader());
	}

	public void UserInterfaceTUI(IInputReader inputReader) {
		InputReader.init(inputReader);
	}

	public String getInput(){
		return InputReader.get().getUserString();
	}
	
	public int getInputInt(){
		return InputReader.get().getUserInt();
	}
	
	public float getInputFloat(){
		return InputReader.get().getUserFloat();
	}
	
	public void showOutput(String string){
		System.out.println(string);
	}

	public void showMenu(ArrayList<ICmd> availableList) {
		System.out.println("------------------------------");
		System.out.println("cmd - description");
		System.out.println("------------------------------");
		for(int i = availableList.size(); i > 0; i--){
			System.out.println(availableList.get(i-1).getInfo());
		}
		System.out.println("------------------------------");
		System.out.print("Enter a cmd: ");
	}
}
